package qqmeeting

import (
	"crypto/hmac"
	"crypto/sha256"
	"encoding/base64"
	"encoding/hex"
)

//Sign 签名
func Sign(orig []byte, secret string) string {
	h := hmac.New(sha256.New, []byte(secret))
	h.Write(orig)

	sha := hex.EncodeToString(h.Sum(nil))
	return base64.StdEncoding.EncodeToString([]byte(sha))
}
